package org.darkforest.dao.redis.impl;

import org.darkforest.dao.redis.AreaRedisDao;
import org.darkforest.dao.redis.templete.AbstractListRedisOper;
import org.darkforest.model.Area;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by valentina on 15/3/15.
 * 区域列表redis操作
 */
@Component
public class AreaRedisDaoImpl extends AbstractListRedisOper<Area>  implements AreaRedisDao{
    @Override
    public void addAreaList(String key, List<Area> areas) {
        this.addList(key,areas);
    }

    @Override
    public List<Area> getAreaList(String key) {
        return this.getList(key);
    }

    @Override
    public void deleteList(String key) {
        this.deleteListByKey(key);
    }

    @Override
    public void addArea(String key, Area area) {
        this.add(key,area);
    }
}
